[IA64] Remove ar.rsc save/restore code in HV
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 2 Nov 2006 19:38:54 +0000 (12:38 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 2 Nov 2006 19:38:54 +0000 (12:38 -0700)
The patch remove codes which save/restore ar.rsc to/from vcpu->arch.old_rsc
when guest doing memory mode switch (virtual -> physical or physical->virtual).
Due to HV is transparent to guest, so there is no need to save/restore ar.rsc
by HV and guest kernel will do that while switching memory mode.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
xen/arch/ia64/vmx/vmx_phy_mode.c
xen/include/asm-ia64/domain.h

index f2ad493c0c211176a9ff0e5871990aede2f41c79..7655092f4372d564c62409438564a4e92e255b8d 100644 (file)
@@ -100,7 +100,6 @@ int mm_switch_table[8][8] = {
 void
 physical_mode_init(VCPU *vcpu)
 {
-    vcpu->arch.old_rsc = 0;
     vcpu->arch.mode_flags = GUEST_IN_PHY;
 }
 
@@ -245,13 +244,11 @@ switch_mm_mode(VCPU *vcpu, IA64_PSR old_psr, IA64_PSR new_psr)
     case SW_V2P:
 //        printk("V -> P mode transition: (0x%lx -> 0x%lx)\n",
 //               old_psr.val, new_psr.val);
-        vcpu->arch.old_rsc = regs->ar_rsc;
         switch_to_physical_rid(vcpu);
         /*
          * Set rse to enforced lazy, to prevent active rse save/restor when
          * guest physical mode.
          */
-        regs->ar_rsc &= ~(IA64_RSC_MODE);
         vcpu->arch.mode_flags |= GUEST_IN_PHY;
         break;
     case SW_P2V:
@@ -262,7 +259,6 @@ switch_mm_mode(VCPU *vcpu, IA64_PSR old_psr, IA64_PSR new_psr)
          * recover old mode which is saved when entering
          * guest physical mode
          */
-        regs->ar_rsc = vcpu->arch.old_rsc;
         vcpu->arch.mode_flags &= ~GUEST_IN_PHY;
         break;
     case SW_SELF:
index 648eea0636efa7ef5ed07045bb3a6f7870e2fe51..cfe7c5e9a326c39f32a2a26856b44b756b084b34 100644 (file)
@@ -186,7 +186,6 @@ struct arch_vcpu {
     char hypercall_continuation;
 
     //for phycial  emulation
-    unsigned long old_rsc;
     int mode_flags;
     fpswa_ret_t fpswa_ret;     /* save return values of FPSWA emulation */
     struct timer hlt_timer;